﻿using System;
using System.Collections.Generic;

namespace Microsoft.Coding4Fun.TweetCraft.Twitter
{
    /// <summary>
    /// Adds tweets and pictures to Twitter using the Twitter API and TwitPic and monitors a 
    /// directory for AutoTweeting of pictures.
    /// </summary>
    public interface ITwitterDispatcherService
    {
        /// <summary>
        /// Queues a tweet for adding to the user's Twitter feed.
        /// </summary>
        /// <param name="tweet">The tweet to queue.</param>
        void QueueTweet(Tweet tweet);

        /// <summary>
        /// Queues a collection of tweets for adding to the user's Twitter feed.
        /// </summary>
        /// <param name="tweets">The tweets to queue.</param>
        void QueueTweets(IEnumerable<Tweet> tweets);

        /// <summary>
        /// Adds a picture to the user's Twitter feed without any message.
        /// </summary>
        /// <param name="picturePath">The path to the picture.</param>
        void QueuePicture(string picturePath);

        /// <summary>
        /// Gets or sets the folder where pictures are stored. AutoTweeting enables adding
        /// pictures that show up in this folder.
        /// </summary>
        string PictureDirectory { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether to enable AutoTweeting of pictures.
        /// </summary>
        bool AutoTweetPictures { get; set; }

        /// <summary>
        /// Gets or sets the amount of time between tweet and picture dispatches.
        /// </summary>
        TimeSpan DispatchPeriod { get; set; }

        /// <summary>
        /// Raised when a tweet has been dispatched.
        /// </summary>
        event EventHandler<TweetEventArgs> Tweeted;
    }
}
